<?php
# PMB Online
# Aplikasi PMB Online untuk Pendaftaran Calon Mahasiswa di PT/PTS Indonesia
# 
# version 1.0
# class jur_view
# file
# created Feb 5, 2013 6:40:47 PM
# 
# (c)2012, arif.laksito@gmail.com

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
?>

<script>
$(function() {
<?php foreach ($jur as $s): ?>                
    $("#dialog_<?php echo $s['id_jurusan']?>").hide();    
    $("#confirm_<?php echo $s['id_jurusan'] ?>").click(function(){
        $("#dialog_<?php echo $s['id_jurusan'] ?>").dialog({            
            height:200,
            modal: false,
            buttons: {
                "Delete": function() {
                    window.location = "<?php echo base_url().'apps/jur_delete/'.$s['id_jurusan']?>";
                    $( this ).dialog( "close" );
                },
                Cancel: function() {
                    $( this ).dialog( "close" );
                }
            }
        });
    });
<?php endforeach; ?>                                        
});
</script>

<?php foreach ($jur as $h): ?>
    <div id="dialog_<?php echo $h['id_jurusan'] ?>" title="Hapus Jurusan?">
        <p style="font-size: 12px">
            <span style="font-size: 24px; float: left; margin: 0 7px 50px 0;"><i class="icon-warning-sign"></i></span>
            Data Jurusan "<?php echo $h['jenjang'].' '.$h['nama_jurusan']?>" akan dihapus, pastikan tidak ada transaksi pada data tersebut
        </p>
    </div>
<?php endforeach; ?>

<h3>Pengaturan Jurusan</h3>
<ul class="breadcrumb">
    <li>PMB Online <span class="divider">/</span></li>  
    <li>Data Master <span class="divider">/</span></li>
    <li>Jurusan</li>
</ul>

<?php if ($msg!=''): ?>
    <div class="<?php echo ($sts) ? 'alert alert-success' : 'alert alert-error' ?>">
        <?php echo $msg ?>
    </div>
<?php endif ?>

<p>
    <?php echo anchor('apps/jur_add', '<i class=icon-plus-sign></i> Tambah Jurusan', 'class="btn btn-small btn-success"') ?>
</p>

<table class="table table-condensed table-hover" style="width: 60%">
    <tr>
        <th>No</th>               
        <th>Nama Program Studi</th>        
        <th>Jenjang</th>        
        <!--
        <th style="width:13%">SPP Tetap</th>                
        <th style="width:13%">SPP Variabel</th>                
        -->
        <th></th>    
    </tr>
    <?php $no = 1 ?>
    <?php foreach ($jur as $j): ?>
        <tr>
            <td><?php echo $no ?></td>		
            <td><?php echo $j['nama_jurusan'] ?></td>
            <td><?php echo $j['jenjang'] ?></td>
            <!--
            <td>
                <div class="pull-right" style="margin-right: 20px">
                    <?php echo number_format($j['spp_tetap']) ?>
                </div>
            </td>
            <td>
                <div class="pull-right" style="margin-right: 20px">
                    <?php echo number_format($j['spp_var']) ?>
                </div>
            </td>
            -->
            <td>
                <?php echo anchor('apps/jur_edit/' . $j['id_jurusan'], '<i class=icon-edit></i>') ?>&nbsp;&nbsp;&nbsp;
                <a href="#" id="confirm_<?php echo $j['id_jurusan'] ?>"><i class="icon-remove"></i></a>
            </td>
        </tr>		
        <?php $no++ ?>
    <?php endforeach ?>	
</table>    